package model.domain;

import java.util.ArrayList;
import java.util.List;

public class Region implements Comparable<Region> {

	public Region(String name, List<Department> departments) {
		super();
		this.name = name;

		this.departments = departments;
	}

	public Region(String name) {
		this.setName(name);
	}

	private String name;

	private List<Department> departments = new ArrayList<Department>();

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setDepartments(List<Department> departments) {
		this.departments = departments;
	}

	public List<Department> getDepartments() {
		return departments;
	}

	public void addDepartment(Department depart) {
		this.getDepartments().add(depart);
	}

	@Override
	public int compareTo(Region o) {
		return this.getName().compareTo(o.getName());
	}

}
